package Arrays_sort;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        Student[] students = new Student[4];
        students[0] = new Student("张三", 180, 18);
        students[1] = new Student("李四", 170, 20);
        students[2] = new Student("王五", 160, 22);
        students[3] = new Student("赵六", 150, 17);
        System.out.println("排序前："+ Arrays.toString( students));


        Arrays.sort(students);
        System.out.println("排序后："+ Arrays.toString( students));

    }
}
